import request from "@/config/index.js"

/**
 * login
 * @param data
 */
// 仪表盘顶部卡片数据
export const getSummary = () => {
  return request.get('/api/StuRecordConttroller/summary');
};
// 获取学期数据
export const getSemester = (id) => {
  return request.get( `/api/StuRecordConttroller/GetSemester?stage=${id}`);
};

// 获取学期和综合评价的体测指标数据
export const getIndictor = () => {
  return request.get( `/api/StuRecordConttroller/GetIndictor`);
};

// 获取成长记录对应的评价数据
export const getPJIndictor = () => {
  return request.get( `/api/StuRecordConttroller/GetPJIndictor`);
};

//根据指标id获取指标配置项
export const getIndictConfigRows = (id) => {
  return request.get( `/api/StuRecordConttroller/GetIndictConfigRows?indictid=${id}`);
}

// 保存自我陈述
export const saveStatement = (data) => {
  return request.post( `/api/StuRecordConttroller/SaveStatement`,data);
};

// 学期评价和综合评价用到的数据
export const getTermPJAndSummary = (semesterid,stage) => {
  return request.get( `/api/StuRecordConttroller/GetIndictCollectionItemsXQ?semesterid=${semesterid}&stage=${stage}`);
};

// 获取学期评价
export const getTermPJ = (semesterid,stage,stuid) => {
  return request.get( `/api/StuRecordConttroller/GetStuRecordRowsXQCK?semesterid=${semesterid}&stage=${stage}&studentid=${stuid}`);
};

// 获取综合评价
export const getSummaryPJ = (semesterid,stage) => {
  return request.get( `/api/StuRecordConttroller/GetStuRecordRowsZPCK?semesterid=${semesterid}&stage=${stage}`);
};

//获取微代码
export const getDictCode = () => {
  return request.get( `/api/StuRecordConttroller/GetDictCode`);
};




